package ru.arriah.servicedesk.bean;

import java.sql.ResultSet;
import java.sql.SQLException;

import ru.arriah.common.bean.GenericBean;

public class RequestPriorityBean extends GenericBean {

   private String value;

   public RequestPriorityBean() {
      super();
   }

   public RequestPriorityBean(int id, String value) {
      super();
      this.id = id;
      this.value = value;
   }
   
   public RequestPriorityBean(ResultSet resultSet) {
      fillFromResultSet(resultSet);
   }

   public String getValue() {
      return value;
   }

   public void setValue(String value) {
      this.value = value;
   }

   @Override
   public boolean isValid() {
      // TODO Auto-generated method stub
      return false;
   }

   @Override
   public void fillFromResultSet(ResultSet resultSet) {      
      try {
         setId(resultSet.getInt("priority.id"));
         setValue(resultSet.getString("priority.value"));
      } catch (SQLException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
   }
}